#ifndef	SUDOKU_ALGORITHM_H
#define	SUDOKU_ALGORITHM_H

#include <map>
#include <set>
#include <boost/foreach.hpp>

#include "sudoku_relations.h"
#include "sudoku_board.h"
#include "sudoku_field.h"
#include "sudoku_definition.h"
//------------------------------------------------------------------------------------------------------------
class SudokuBoard;
class SudokuRelations;
class SudokuField;
class SudokuDefinition;
//------------------------------------------------------------------------------------------------------------
class SudokuSolvingAlgorithm
{
    private:

	public:
        //SudokuSolvingAlgorithm(SudokuBoard* pSudBoard, SudokuDefinition* pSudDef);
        //SudokuSolvingAlgorithm(SudokuBoard*, SudokuDefinition*);
        //SudokuSolvingAlgorithm(): sudBoard(pSudBoard) {} //max solutions
        virtual void solve(SudokuBoard* pSudBoard, vector<int>::iterator fieldIdxIt, vector<int>::iterator* endField) = 0;
        int getMaxSolutions();

	protected:
        SudokuBoard* sudBoard;
        vector<int>::iterator* endField;
        //SudokuDefinition * sudDef;
        //int maxSolutions;
        //void update();
        //std::set<int> getAvailableValues(int);
};
//------------------------------------------------------------------------------------------------------------
class SudokuSolvingRecursive : public SudokuSolvingAlgorithm
{
    public:
        //SudokuSolvingRecursive();
            //SudokuSolvingAlgorithm(pSudBoard)
        virtual void solve(SudokuBoard* pSudBoard, vector<int>::iterator fieldIdxIt, vector<int>::iterator* endField);

    private:
        void solve(vector<int>::iterator fieldIdxIt);
};
//------------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------------
#endif
